public class Test6 {
    public static void main(String[] args) {
        System.out.print("水仙花数：");
        for (int i = 100; i < 1001; i++) {
            int gewei = i%10;
            int shiwei = i/10%10;
            int baiwei = i/100;
            if (i == Math.pow(gewei, 3) + Math.pow(shiwei, 3) + Math.pow(baiwei, 3)){
                System.out.print(i+" ");
            }
        }

    }
}
